<?php


namespace app\services;


use app\models\OrderLogs;

class OrderLogsSer extends Services {
    protected $to_user_id;
    protected $from_user_id;
    protected $order_id;
    protected $user_product_id;
    protected $price;

    /**
     * @return mixed
     */
    public function getToUserId() {
        return $this->to_user_id;
    }

    /**
     * @param mixed $to_user_id
     */
    public function setToUserId($to_user_id): void {
        $this->to_user_id = $to_user_id;
    }

    /**
     * @return mixed
     */
    public function getFromUserId() {
        return $this->from_user_id;
    }

    /**
     * @param mixed $from_user_id
     */
    public function setFromUserId($from_user_id): void {
        $this->from_user_id = $from_user_id;
    }

    /**
     * @return mixed
     */
    public function getOrderId() {
        return $this->order_id;
    }

    /**
     * @param mixed $order_id
     */
    public function setOrderId($order_id): void {
        $this->order_id = $order_id;
    }

    /**
     * @return mixed
     */
    public function getUserProductId() {
        return $this->user_product_id;
    }

    /**
     * @param mixed $user_product_id
     */
    public function setUserProductId($user_product_id): void {
        $this->user_product_id = $user_product_id;
    }

    /**
     * @return mixed
     */
    public function getPrice() {
        return $this->price;
    }

    /**
     * @param mixed $price
     */
    public function setPrice($price): void {
        $this->price = $price;
    }

    public function addOrderLogs() {
        $OrderLogs = new OrderLogs();
        $OrderLogs->to_user_id = $this->to_user_id;
        $OrderLogs->from_user_id = $this->from_user_id;
        $OrderLogs->order_id = $this->order_id;
        $OrderLogs->user_product_id = $this->user_product_id;
        $OrderLogs->price = $this->price;
        return $OrderLogs->save();
    }

}